<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
	
<%@ taglib prefix="c" uri="/WEB-INF/tlds/c.tld"%>
<%@ taglib prefix="spring" uri="/WEB-INF/tlds/spring.tld"%>

<c:set var="BasePath" value="${pageContext.request.contextPath}"></c:set>
<c:set var="Plugins" value="${pageContext.request.contextPath}/res/plugins"></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>品牌列表页面</title>

<link href="${Plugins}/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
<link href="${Plugins}/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
<script src="${Plugins}/jquery/jquery-1.3.2.min.js"	type="text/javascript"></script>
<script src="${Plugins}/ligerUI/js/ligerui.min.js" type="text/javascript"></script>
<script type="text/javascript" src="${BasePath}/res/js/ligerCommon.js"></script>
<script type="text/javascript" src="${BasePath}/res/js/json2.js"></script>

<style type="text/css">
#searchbar{
   margin-bottom: 10px;
   margin-left:15px;
  }
  .navbar {
		height: 20px;
		border-bottom: #E6E6E6 solid 1px;
		line-height: 20px;
	}
.l-button-search {
	width: 50px;
	margin-left: 10px;
	padding-bottom: 2px;
	display: inline;
}
</style>
</head>
<body style="padding:6px; overflow:hidden;">
<div class="navbar">
		<span>您当前的位置：</span>
		基础数据管理&gt;供应商管理 &gt;新增供应商&gt;品牌列表
</div>
<br />
<form action="#" name="queryForm" id="queryForm" method="POST" >
品牌名称：<input type="text" id="brandName" name="brandName" value="${brand.brandName}" />&nbsp;
         <input type="submit" id="btnSearch" value="查询" class="l-button-search" />
           <input type="button" id="btnReset" value="重置" class="l-button-search" />
</form>
<br />
<div id="maingrid" style="margin:0; padding:0"></div>
  <div style="display:none;">
  <!-- 展示列表数据  -->
</div>

<script>
    var basePath='${BasePath}';
    var grid = null;
	var isSuccess = '';
    $(function () {
		$('#btnReset').click(function() {
        	$('#brandName').val('');
        });
    	 // 重置
        $("#btnReset").click(function(){
    		$('#searchbar :input').not(':submit, :button, :reset').val('').removeAttr('checked').removeAttr('selected');
    	});
        grid = $("#maingrid").ligerGrid({
        	checkbox: true,
            columns: [
            { display: '品牌名称', name: 'brandName'},
            { display: '品牌编码', name: 'no'}
            ], 
            pageSize:30,
            width: '100%',
            height: '100%',
            dataType: 'server', 
            dataAction: 'server',
            pagesizeParmName: 'pageSize',
			parms: [
                    {name: "brandName", value:$("#brandName").val()},
            	],
			url: "BrandList.do"
        });
    });
    
    
    //检查是否有没有选数据，给出相应提示
    function addBrand(){
    	 var manager = $("#maingrid").ligerGetGridManager();
 	     var rows = manager.getSelectedRows();
 	     var seleteRows = JSON.stringify(rows.length);
 	     if(seleteRows == 0){
 	    	 $.ligerDialog.warn('请选择品牌');
			  result = false;
 	     }else{
 	    	 parent.brandJson = rows;
 	    	 parent.brandSize = seleteRows;
 	    	 isSuccess = "success";
 	     }
    }
    
 
</script>
	
</body>
</html>